package com.itheima.service.impl;

import com.itheima.service.MessageService;
import com.itheima.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * ClassName: OrderServiceImpl
 * Description:
 * Date: 2023/03/14 PM 10:42:42
 * <p>
 * project: springboot
 * package: com.itheima.service.impl
 * email: 1085844536@qq.com
 * version:
 *
 * @author WangGuojian
 */
@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    private MessageService messageService;

    /**
     * 订单处理
     *
     * @param id {@link String}
     */
    @Override
    public void order(String id) {
        // 一系列操作，包含各种服务调用，处理各种业务
        System.out.println("订单开始处理");
        // 短信消息处理
        messageService.sendMessage(id);
        System.out.println("订单处理结束");
        System.out.println();
    }
}
